package com.zz.parkingsystem.service.impl;

import com.zz.parkingsystem.entity.Checkon;
import com.zz.parkingsystem.entity.Inspector;
import com.zz.parkingsystem.mapper.CheckonMapper;
import com.zz.parkingsystem.mapper.InspectorMapper;
import com.zz.parkingsystem.service.CheckOnService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * @Auther: BAISIHANG
 * @Date: 2022/8/31 - 08 - 31 - 9:41
 * @Description: com.zz.parkingsystem.service.impl
 * @version: 1.0
 */
@Service
public class CheckOnServiceImpl implements CheckOnService {
    @Resource
    private CheckonMapper checkonMapper;
    @Resource
    private InspectorMapper inspectorMapper;


    @Override
    public Checkon getselectByPrimaryKeyByInspectorId(Integer id) {
        return checkonMapper.selectByPrimaryKeyByInspectorId(id);
    }

    @Override
    public List getselectByPrimaryKeyBytime(Date time,int ins_id) {
        return checkonMapper.selectByPrimaryKeyBytime(time,ins_id);
    }

    @Override
    public int getselectByPrimaryKeyBytimeNormal(Date time,int ins_id) {
        return checkonMapper.selectByPrimaryKeyBytimeNormal(time,ins_id);
    }

    @Override
    public int getselectByPrimaryKeyBytimeLate(Date time,int ins_id) {
        return checkonMapper.selectByPrimaryKeyBytimeLate(time,ins_id);
    }

    @Override
    public List getselstaCheckOn(String co_time) {
        return checkonMapper.selstaCheckOn(co_time);
    }

    @Override
    public int getselnormal() {
        return checkonMapper.selnormal();
    }

    @Override
    public int getselAbnormal() {
        return checkonMapper.selAbnormal();
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return checkonMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Checkon record) {
        return checkonMapper.insert(record);
    }

    @Override
    public int insertSelective(Checkon checkon) {

        return checkonMapper.insertSelective(checkon);
    }

    @Override
    public Checkon selectByPrimaryKey(Long id) {
        return checkonMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Checkon record) {
        return checkonMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Checkon record) {
        return checkonMapper.updateByPrimaryKey(record);
    }
}
